package endcourseproject;

import java.util.Random;

public class RandomDrive extends Behavior {

	
	
	private Random _random = new Random();
	private int _direction = 0;
	private final float _magnitude = 10f;
	
	
	@Override
	public /*synchronized */int getDirection() {
		return _direction;
	}

	@Override
	public float getMagnitude() {
		return _magnitude;
	}

	
	public void run()
	{
		while(true)
		{
			int temp = _random.nextInt(360);
			
			/*synchronized (this)*/ {
				_direction = temp;
			}
			//LCD.drawInt(temp, 0, 6);
			Common.sleep(10000);
		}
	}
	
}
